package com.example.statistics.bean

import android.app.Activity
import android.content.Intent
import android.text.Editable
import com.example.statistics.ex.IDialogModel
import com.example.statistics.weight.TextProcessingView
import com.jhj.prompt.fragment.AlertFragment

/**
 * 自定义录入Bean类
 */
class DefineInputBean(
    // 标签名字
    val labelText: String,
    //标签key，上传的key
    val labelKey: String,
    //标签的样式
    val style: Int,
    //标签的value，上传的value
    var labelValue: String? = "",
    //unitText
    var unitText: String? = null,
    //默认value的值
    //val defaultContentText: String? = null,
    //默认日期格式
    val defaultDateFormat: String = "yyyy-MM-dd",
    //默认小数点位数
    val defaultDecimalPoint: Int = 2,
    //是否可为空
    val isNull: Boolean = true,
    //变化监听器
    val afterTextChangeListener: (TextProcessingView.(Editable?, Map<String, TextProcessingView>) -> Unit)? = null,
    //界面跳转
    val jumps: Pair<() -> Intent, TextProcessingView.(java.io.Serializable?, Map<String, TextProcessingView>) -> Unit>? = null,
    //singleDialog：string类的底部弹出框
    val singleDialog: Pair<List<String>, (TextProcessingView.(String, Map<String, TextProcessingView>) -> Unit)>? = null,
    //singleDialog：IDialogModel类的底部弹出框
    val singleDialogT: Pair<List<IDialogModel>, TextProcessingView.(Int, Map<String, TextProcessingView>) -> Unit>? = null,
    //右侧单位点击事件
    val symbolAction: TextProcessingView.(Map<String, TextProcessingView>) -> Unit? = { },
    val clicked: (TextProcessingView.(Map<String, TextProcessingView>) -> Unit)? = null,

    )

abstract class ActJumps(val a: String, val body: Map<String, TextProcessingView>)